package com.heima.apis.article.fallback;

import com.heima.apis.article.IArticleClient;
import com.heima.model.common.dtos.app.ArticleDto;
import com.heima.model.common.dtos.app.ArticlePageDto;
import com.heima.model.common.dtos.common.ResponseResult;
import com.heima.model.common.enums.AppHttpCodeEnum;
import org.springframework.stereotype.Component;

@Component
public class IArticleClientFallback implements IArticleClient {

    @Override
    public ResponseResult saveArticle(ArticleDto articleDto) {
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR,"获取数据失败");
    }

    /**
     * 查询app端所有文章信息
     *
     * @param articlePageDto
     */
    @Override
    public ResponseResult findAll(ArticlePageDto articlePageDto) {
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR,"获取数据失败");
    }
}
